Creates a Font dialog box that enables the user to choose attributes for a logical font.
#include <Misc.au3>
_ChooseFont([$s_FontName = "Courier New"[, $i_size = 10[, $i_colorref = 0]]])
Parameters
$s_FontName | Optional: Default font name |
$i_size | Optional: pointsize of font |
$i_colorref | Optional: COLORREF rgbColors |
Return Value
Returns Array, $array[0] contains the number of elements
Remarks
$array[1] - attributes = BitOr of italic:2, undeline:4, strikeout:8
Related
None.
Example
#include <Misc.au3>
Local $a_font
$a_font = _ChooseFont ("Arial",8)
If (@error) Then
MsgBox(0, "", "Error _ChooseFont: " & @error)
Else
MsgBox(0, "", "Font Name: " & $a_font[2] & @LF & "Size: " & $a_font[3] & @LF & "Weight: " & $a_font[4] & @LF & "COLORREF rgbColors: " & $a_font[5] & @LF & "Hex BGR Color: " & $a_font[6] & @LF & "Hex RGB Color: " & $a_font[7])
EndIf
$a_font = _ChooseFont ()
If (@error) Then
MsgBox(0, "", "Error _ChooseFont: " & @error)
Else
MsgBox(0, "", "Font Name: " & $a_font[2] & @LF & "Size: " & $a_font[3] & @LF & "Weight: " & $a_font[4] & @LF & "COLORREF rgbColors: " & $a_font[5] & @LF & "Hex BGR Color: " & $a_font[6] & @LF & "Hex RGB Color: " & $a_font[7])
EndIf